$hadoop jar /opt/module/hadoop-3.1.3/share/hadoop/tools/lib/hadoop-streaming-3.1.3.jar  
-D stream.non.zero.exit.is.failure=false 
-file mapper1.py 
-file reducer1.py 
-input /hw7/MBA.txt 
-output /hw7/output3 
-mapper 'python mapper1.py' 
-reducer 'python reducer1.py'
#第一段命令为统计商品组和出现的次数
$hadoop jar /opt/module/hadoop-3.1.3/share/hadoop/tools/lib/hadoop-streaming-3.1.3.jar 
-D stream.non.zero.exit.is.failure=false 
-D mapred.output.key.comparator.class=org.apache.hadoop.mapred.lib.KeyFieldBasedComparator  
-D mapred.text.key.comparator.options=-k1,6r 
-file mapper2.py 
-file reducer2.py 
-input /hw7/output3/* 
-output /hw7/result/output3 
-mapper 'python mapper2.py' 
-reducer 'python reducer2.py'
#第二阶段的命令是进行排序